package com.ethink.platform.controller.mdm;

import com.ethink.framework.common.web.BaseController;
import com.ethink.framework.common.web.response.CommonResponse;
import com.ethink.mdm.api.BrandFacade;
import com.ethink.mdm.api.enums.MateGroupEnum;
import com.ethink.mdm.api.info.BrandInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author default
 * @date 2022-09-26
 */
@Tag(name = "BrandController", description = "品牌主数据 Controller")
@RestController
@Slf4j
@RequestMapping("platform-server/v1/mdm-service")
public class BrandController extends BaseController {

    @Autowired
    private BrandFacade brandFacade;

    @Operation(summary = "查询美妆品牌")
    @GetMapping("/brand/listMzBrand")
    public CommonResponse<List<BrandInfo>> listMzBrand() {
        return succeedWith(brandFacade.listBrandByMateGroup(MateGroupEnum.MZ.getIntValue()));
    }

}